//
//@File    :	5.4_formore.cpp
//@Time    :	2021/08/04 17:57:45
//@Auther  :	Sun Sheng
//@Contact :	970340843@qq.com
//@Desc    :	more looping with for
//

#include <iostream>
const int Arsize = 16;
using namespace std;
int main()
{
    long long factorials[Arsize];
    factorials[1] = factorials[0] = 1LL;
    for (int i = 2; i < Arsize; i++)
    {
        factorials[i] = i*factorials[i-1];
    }
    for (int i = 0; i < Arsize; i++)
    {
        cout<<i<<"! = "<<factorials[i]<<endl;
    }
    
    system("pause");
    return 0;
}